@Startib
COMPARE itbo, "0"
IF>, @normal
SET Itbo, "1"
SET space1, "0"
SET space1n, ""
SET space2, "0"
SET space2n, ""
SET space3, "0"
SET space3n, ""
SET space4, "0"
SET space4n, ""
SET space5, "0"
SET space5n, ""
SET space6, "0"
SET space6n, ""
SET space7, "0"
SET space7n, ""
SET space8, "0"
SET space8n, ""
SET space9, "0"
SET space9n, ""
SET space10, "0"
SET space10n, ""
@normal
2: Here you can store items!
2: Simply throw whatever item you want into me!
2: I'll then store it.
2: I have 2 sections of 10 slots each, so if section 1 overflows
2: There's section 2
2: Or right-click on me, and I'll give you a list of the items you have stored, and can take out.
@ItemBox
END
@eventactorgive2
	COMPARE #<itbo>, "0"
	IF= @ibnotready
	COMPARE #<item.id>, "0"
	IF> @dcheck
   5: You can't deposit gold in me, use the bank for that.
   GIVE G#<item.goldgiven>
   GOTO @ItemBox

   @dcheck
   N: You want to deposit #<item.name>?
   ASK 30
   IF YES, @deposit
   5: Alright.
   GOTO @ItemBox

   @deposit
   COMPARE #<space1>, "0"
   IF> @s2
   SET space1, #<item.id>
   SET space1n, #<item.name>
   5: #<item.name> is now stored!
   GOTO @ItemBox

   @s2
   COMPARE #<space2>, "0"
   IF> @s3
   SET space2, #<item.id>
   SET space2n, #<item.name>
   5: #<item.name> is now stored!
   GOTO @ItemBox

   @s3
   COMPARE #<space3>, "0"
   IF> @s4
   SET space3, #<item.id>
   SET space3n, #<item.name>
   5: #<item.name> is now stored!
   GOTO @ItemBox

   @s4
   COMPARE #<space4>, "0"
   IF> @s5
   SET space4, #<item.id>
   SET space4n, #<item.name>
   5: #<item.name> is now stored!
   GOTO @ItemBox

   @s5
   COMPARE #<space5>, "0"
   IF> @s6
   SET space5, #<item.id>
   SET space5n, #<item.name>
   5: #<item.name> is now stored! 
   GOTO @ItemBox

   @s6
   COMPARE #<space6>, "0"
   IF> @s7
   SET space6, #<item.id>
   SET space6n, #<item.name>
   5: #<item.name> is now stored!
   GOTO @ItemBox    

   @s7    
   COMPARE #<space7>, "0"    
   IF> @s8    
   SET space7, #<item.id>    
   SET space7n, #<item.name>    
   5: #<item.name> is now stored!    
   GOTO @ItemBox    

   @s8    
   COMPARE #<space8>, "0"    
   IF> @s9    
   SET space8, #<item.id>    
   SET space8n, #<item.name>    
   5: #<item.name> is now stored!    
   GOTO @ItemBox    

   @s9    
   COMPARE #<space9>, "0"    
   IF> @s10    
   SET space9, #<item.id>    
   SET space9n, #<item.name>    
   5: #<item.name> is now stored!    
   GOTO @ItemBox    

   @s10    
   COMPARE #<space10>, "0"    
   IF> @full1    
   SET space10, #<item.id>    
   SET space10n, #<item.name>    
   5: #<item.name> is now stored!    
   GOTO @ItemBox    

   @full1
   GOTO @box2
   END    

   @eventactorclick2
	COMPARE #<Itbo>, 0
	IF= @startib
@eventactorclick2menu    
   MENU "#<space1n>=@gs1", "#<space2n>=@gs2", "#<space3n>=@gs3", "#<space4n>=@gs4", "#<space5n>=@gs5", "#<space6n>=@gs6", "#<space7n>=@gs7", "#<space8n>=@gs8", "#<space9n>=@gs9", "#<space10n>=@gs10", "Choose a different section=@choosesec"    
END   
   @gs1    
   COMPARE #<space1>, "0"    
   IF=, @empty    
   2: Here's #<space1n>!    
   GIVE I#<space1>    
   SET space1 "0"    
   SET space1n ""    
   GOTO @ItemBox    
       
   @gs2    
   COMPARE #<space2>, "0"    
   IF=, @empty    
   2: Here's #<space2n>!    
   GIVE I#<space2>    
   SET space2 "0"    
   SET space2n ""    
   GOTO @ItemBox    
       
   @gs3    
   COMPARE #<space3>, "0"    
   IF=, @empty    
   2: Here's #<space4n>!     
   GIVE I#<space3>    
   SET space3 "0"    
   SET space3n ""    
   GOTO @ItemBox    
       
   @gs4    
   COMPARE #<space4>, "0"    
   IF=, @empty    
   2: Here's #<space4n>!    
   GIVE I#<space4>    
   SET space4 "0"    
   SET space4n ""    
   GOTO @ItemBox    
       
   @gs5    
   COMPARE #<space5>, "0"    
   IF=, @empty    
   2: Here's #<space5n>!    
   GIVE I#<space5>    
   SET space5 "0"    
   SET space5n ""    
   GOTO @ItemBox    
       
   @gs6    
   COMPARE #<space6>, "0"    
   IF=, @empty    
   2: Here's #<space6n>!    
   GIVE I#<space6>    
   SET space6 "0"    
   SET space6n ""    
   GOTO @ItemBox    
       
   @gs7    
   COMPARE #<space7>, "0"    
   IF=, @empty    
   2: Here's #<space7n>!    
   GIVE I#<space7>    
   SET space7 "0"    
   SET space7n ""    
   GOTO @ItemBox    
       
   @gs8    
   POSE 3
   WAIT .7
   POSE 2
   COMPARE #<space8>, "0"    
   IF=, @empty    
   2: Here's #<space8n>!    
   GIVE I#<space8>    
   SET space8 "0"    
   SET space8n "'    
   GOTO @ItemBox    
       
   @gs9    
   COMPARE #<space9>, "0"    
   IF=, @empty    
   5: Here's #<space9n>!    
   GIVE I#<space9>    
   SET space9 "0"    
   SET space9n ""    
   GOTO @ItemBox    
       
   @gs10    
   POSE 3
   WAIT .7
   POSE 2
   COMPARE #<space10>, "0"    
   IF=, @empty    
   2: Here's #<space10n>!    
   GIVE I#<space10>    
   SET space10 "0"    
   SET space10n ""    
   GOTO @ItemBox
   END

@box2
   COMPARE #<space11>, "0"
   IF> @s12
   SET space11, #<item.id>
   SET space11n, #<item.name>
   2: #<item.name> is now stored!
   GOTO @ItemBox

   @s12
   COMPARE #<space12>, "0"
   IF> @s13
   SET space12, #<item.id>
   SET space12n, #<item.name>
   2: #<item.name> is now stored!
   GOTO @ItemBox

   @s13
   COMPARE #<space13>, "0"
   IF> @s14
   SET space13, #<item.id>
   SET space13n, #<item.name>
   2: #<item.name> is now stored!
   GOTO @ItemBox

   @s14
   COMPARE #<space14>, "0"
   IF> @s15
   SET space14, #<item.id>
   SET space14n, #<item.name>
   2: #<item.name> is now stored!
   GOTO @ItemBox

   @s15
   COMPARE #<space15>, "0"
   IF> @s16
   SET space15, #<item.id>
   SET space15n, #<item.name>
   2: #<item.name> is now stored! 
   GOTO @ItemBox

   @s16
   COMPARE #<space16>, "0"
   IF> @s17
   SET space16, #<item.id>
   SET space16n, #<item.name>
   2: #<item.name> is now stored!
   GOTO @ItemBox    

   @s17    
   COMPARE #<space17>, "0"    
   IF> @s18    
   SET space17, #<item.id>    
   SET space17n, #<item.name>    
   2: #<item.name> is now stored!    
   GOTO @ItemBox    

   @s18    
   COMPARE #<space18>, "0"    
   IF> @s19    
   SET space18, #<item.id>    
   SET space18n, #<item.name>    
   2: #<item.name> is now stored!    
   GOTO @ItemBox    

   @s19    
   COMPARE #<space19>, "0"    
   IF> @s20    
   SET space19, #<item.id>    
   SET space19n, #<item.name>    
   2: #<item.name> is now stored!    
   GOTO @ItemBox    

   @s20    
   COMPARE #<space20>, "0"    
   IF> @full2
   SET space20, #<item.id>    
   SET space20n, #<item.name>    
   2: #<item.name> is now stored!    
   GOTO @ItemBox    

   @full2
   2: Sorry, but the box is full.     
   2: You need to remove an item before you can deposit one.     
   GIVE I<#itemgiven>     
   GOTO @ItemBox
   END    

   @box2w   
   MENU "#<space11n>=@gs11", "#<space12n>=@gs12", "#<space13n>=@gs13", "#<space14n>=@gs14", "#<space15n>=@gs15", "#<space16n>=@gs16", "#<space17n>=@gs17", "#<space18n>=@gs18", "#<space19n>=@gs19", "#<space20n>=@gs20", "Choose a different section=@choosesec"
END     
   @gs11    
   COMPARE #<space11>, "0"    
   IF=, @empty    
   2: Here's #<space1n>!    
   GIVE I#<space11>    
   SET space11 "0"    
   SET space11n ""    
   GOTO @ItemBox    
       
   @gs12    
   COMPARE #<space12>, "0"    
   IF=, @empty    
   2: Here's #<space12n>!    
   GIVE I#<space12>    
   SET space12 "0"    
   SET space12n ""    
   GOTO @ItemBox    
       
   @gs13    
   COMPARE #<space13>, "0"    
   IF=, @empty    
   2: Here's #<space13n>!    
   GIVE I#<space13>    
   SET space13 "0"    
   SET space13n ""    
   GOTO @ItemBox    
       
   @gs14    
   COMPARE #<space14>, "0"    
   IF=, @empty    
   2: Here's #<space14n>!    
   GIVE I#<space14>    
   SET space14 "0"    
   SET space14n ""    
   GOTO @ItemBox    
       
   @gs15    
   COMPARE #<space15>, "0"    
   IF=, @empty    
   2: Here's #<space15n>!    
   GIVE I#<space15>    
   SET space15 "0"    
   SET space15n ""    
   GOTO @ItemBox    
       
   @gs16    
   COMPARE #<space16>, "0"    
   IF=, @empty    
   2: Here's #<space16n>!    
   GIVE I#<space6>    
   SET space16 "0"    
   SET space16n ""    
   GOTO @ItemBox    
       
   @gs17    
   COMPARE #<space17>, "0"    
   IF=, @empty    
   POSE 3
   WAIT .7
   POSE 2
   2: Here's #<space17n>!    
   GIVE I#<space17>    
   SET space17 "0"    
   SET space17n ""    
   GOTO @ItemBox    
       
   @gs18    
   COMPARE #<space18>, "0"    
   IF=, @empty    
   2: Here's #<space18n>!    
   GIVE I#<space18>    
   SET space18 "0"    
   SET space18n ""    
   GOTO @ItemBox    
       
   @gs19    
   COMPARE #<space19>, "0"    
   IF=, @empty   
   2: Here's #<space19n>!    
   GIVE I#<space19>    
   SET space19 "0"    
   SET space19n ""    
   GOTO @ItemBox    
       
   @gs20    
   COMPARE #<space20>, "0"    
   IF=, @empty    
   2: Here's #<space20n>!    
   GIVE I#<space20>    
   SET space20 "0"    
   SET space20n ""    
   GOTO @ItemBox    

   @choosesec
   2: Type the number of the section.
   ASK 9999
   COMPARE #<lastask>, "1"
   IF=, @eventactorclick2
   COMPARE #<lastask>, "2"
   IF=, @box2w
   2: Sorry, I only have 2 sections.
   GOTO @choosesec
       
   @empty    
   2: Sorry that slot is empty.    
   GOTO @ItemBox    
   END;It's the end damnit Simmen! :P

@ibnotready
	GIVE I#<item.id>
	GIVE G#<item.goldgiven>
	2: Hey, you must first learn how to use the item box.
	2: Right click me.
END